<template>
  <h1>subCmd list view</h1>
  <div v-for="methodObj in methodList" class="text item">
    {{ methodObj.cmd }} {{ methodObj.subCmd }} - {{ methodObj.methodName }}
  </div>

</template>

<script>
import {reactive} from "vue";

export default {
  name: "MethodList",
  setup() {
    // 读取方法列表
    let methodList = reactive([{
      cmd: 1,
      subCmd: 1,
      methodName: "hello-1"
    }, {
      cmd: 1,
      subCmd: 2,
      methodName: "hello-2"
    }]);

    function listSubCmd(cmd) {
      console.info("list subCmd ", cmd)
    }

    return {
      methodList,
      listSubCmd
    }
  }
}
</script>

<style scoped>

</style>